package com.lottery.common.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lottery.common.entity.EventsInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.Param;

import java.util.List;

/**
 * <p>
 * 赛事信息表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2019-09-23
 */
public interface EventsInfoMapper extends BaseMapper<EventsInfo> {

    EventsInfo selectEventsById(NutMap nutMap);

    List<EventsInfo> selectEventsList(NutMap nutMap);

    IPage<EventsInfo> selectEventsList2(Page page,@Param("nutMap") NutMap nutMap);

//    @Select("SELECT * FROM 竞彩赔率 order by id desc")
    @DS("slave_1")
    List<NutMap> selectEvents(NutMap nutMap);


    @Select("SELECT * FROM 竞彩赔率 order by 更新时间 desc")
    @DS("slave_1")
    List<NutMap> selectEventsByTime();
}
